package com.ruoyi.business.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.mapper.TDeviceLogMapper;
import com.ruoyi.business.domain.TDeviceLog;
import com.ruoyi.business.service.ITDeviceLogService;

/**
 * 设备日志Service业务层处理
 * 
 * @author laoguo
 * @date 2025-08-12
 */
@Service
public class TDeviceLogServiceImpl implements ITDeviceLogService 
{
    @Autowired
    private TDeviceLogMapper tDeviceLogMapper;

    /**
     * 查询设备日志
     * 
     * @param logId 设备日志主键
     * @return 设备日志
     */
    @Override
    public TDeviceLog selectTDeviceLogByLogId(Long logId)
    {
        return tDeviceLogMapper.selectTDeviceLogByLogId(logId);
    }

    /**
     * 查询设备日志列表
     * 
     * @param tDeviceLog 设备日志
     * @return 设备日志
     */
    @Override
    public List<TDeviceLog> selectTDeviceLogList(TDeviceLog tDeviceLog)
    {
        return tDeviceLogMapper.selectTDeviceLogList(tDeviceLog);
    }

    /**
     * 新增设备日志
     * 
     * @param tDeviceLog 设备日志
     * @return 结果
     */
    @Override
    public int insertTDeviceLog(TDeviceLog tDeviceLog)
    {
        tDeviceLog.setCreateTime(DateUtils.getNowDate());
        return tDeviceLogMapper.insertTDeviceLog(tDeviceLog);
    }

    /**
     * 修改设备日志
     * 
     * @param tDeviceLog 设备日志
     * @return 结果
     */
    @Override
    public int updateTDeviceLog(TDeviceLog tDeviceLog)
    {
        return tDeviceLogMapper.updateTDeviceLog(tDeviceLog);
    }

    /**
     * 批量删除设备日志
     * 
     * @param logIds 需要删除的设备日志主键
     * @return 结果
     */
    @Override
    public int deleteTDeviceLogByLogIds(Long[] logIds)
    {
        return tDeviceLogMapper.deleteTDeviceLogByLogIds(logIds);
    }

    /**
     * 删除设备日志信息
     * 
     * @param logId 设备日志主键
     * @return 结果
     */
    @Override
    public int deleteTDeviceLogByLogId(Long logId)
    {
        return tDeviceLogMapper.deleteTDeviceLogByLogId(logId);
    }
}
